<template>
	<view class="viewBox">
		<view>
			<view class="header">
				<image src="../../../static/img/quickly/intervenscheme/plan.png"></image>
				<view class="information">
					<view class="top">
						<view>会员：{{userInfo.realName}}</view>
						<view>年龄：{{userInfo.age || ''}}岁</view>
						<view>性别：{{userInfo.sex == 1 ? '男' : '女'}}</view>
					</view>
					<view class="bottom">
						<view>签发人：{{locaInfo.realName}}</view>
						<view>签发日期：{{signData}}</view>
					</view>
				</view>
			</view>
			<view class="two"></view>
			<view class="three"></view>
		</view>
		
		<view class="mainContent">
			<view class="item" v-for="(item,index) in list" :key="index">
				<view class="itemOne">
					<view>执行日期：{{item.createdDate}}</view>
					<view>主要内容：{{item.content}}</view>
				</view>
				<view class="itemTwo">
					<view class="title">具体事项：</view>
					<view class="content" v-html="item.specificMatters"></view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {getUrlParam,filterData2,age} from '@/static/js/filter.js';
	export default{
		data(){
			return {
				list:[],
				userInfo:{},
				locaInfo:{},
				signData:''
			}
		},
		mounted(){
			const _this = this;
			const id = getUrlParam('id')
			this.locaInfo = JSON.parse(localStorage.userInfo)
			_this.$api.InterventionPlanDetails(id).then((res)=>{
				_this.list = res.data.result.appHealthInterventionPlanEntities
				_this.signData = res.data.result && res.data.result.modifiedDate ||res.data.result.createdDate
				_this.$api.findByUserId(res.data.result.userId).then((res)=>{
					_this.userInfo = res.data.result;
				})
			})
		},
		methods:{
			age
		}
	}
</script>

<style lang="scss" scoped>
	.viewBox {
		width: 750upx;
		min-height: calc(100vh - 44px);
		background-color: #F8F8F8;
		.header {
			background: url(../../../static/img/quickly/information/bj3@2x.png) no-repeat;
			background-size: 100% 100%;
			width: 702upx;
			height: 256upx;
			margin: 0 24upx;	
			z-index: 10;
			image {
				width: 622upx;
				height: 44upx;
				margin: 0 auto 44upx;
				display: block;
				padding-top: 27upx;
			}
			.information {
				width: 100%;
				padding: 0 42upx;
				box-sizing: border-box;
				.top,.bottom {
					display: flex;
					align-items: center;
					justify-content: space-around;
					view {
						color: #FFFFFF;
						font-weight: 30upx;
						margin-right: 25upx;
					}
					view:last-child {
						margin-right: 0;
					}
				}
				.bottom {
					margin-top: 20upx;
				}
			}
		}
		.two {
			background: url(../../../static/img/quickly/information/bj2@2x.png) no-repeat;
			background-size: 100% 100%;
			width: 602upx;
			height: 254upx;
			margin: -222upx auto 0;
		}
		.three {
			background: url(../../../static/img/quickly/information/bj1@2x.png) no-repeat;
			background-size: 100% 100%;
			width: 508upx;
			height: 254upx;
			margin: -226upx auto 0;
		}
		
		.mainContent {
			width: 702upx;
			margin: 0 24upx;
			margin-top: 56upx;
			.item {
				margin-bottom: 28upx;
				.itemOne {
					height: 100%;
					width: 702upx;
					background-color: #38CB97;
					border-radius: 14upx;
					display: flex;
					align-items: center;
					padding: 20upx 40upx 40upx;
					box-sizing: border-box;
					view:first-child {
						flex: 1;
						color: #FFFFFF;
						font-size: 28upx;
					}
					view:last-child {
						color: #FFFFFF;
						font-size: 28upx;
					}
				}
				.itemTwo {
					width: 702upx;
					height:100%;
					background: #FFFFFF;
					border-radius: 0 0 14upx 14upx;
					padding: 0 28upx;
					margin-top: -10upx;
					.title {
						color: #333333;
						font-size: 28upx;
						font-weight: bold;
						padding: 22upx 0;
					}
					.content {
						color: #333333;
						font-size: 28upx;
						padding-bottom: 28upx;
					}
				}
			}
		}
	}
</style>
